﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Net
{
    public abstract class BaseResponseHandler<TResponseData> : IResponseHandler
    {
        public void Handle(NetPackage response)
        {
            TResponseData responseData = (TResponseData)Serializer.FromNetBuffer(response);

            OnHandle(response, responseData);
        }

        protected abstract void OnHandle(NetPackage response, TResponseData responseData);
    }
}
